// src/api/inventory.ts
import request from '@/utils/request'

export interface InventoryQueryParams {
  skuId: string
}

/**
 * 按 SKU 查询库存
 * GET /api/inventory/query
 * @param {InventoryQueryParams} params 查询参数
 * @returns {Promise<any>} 响应示例：{"code":0,"message":"success","data":[]}
 *
 * data 项示例（文档所示，可能为占位结构）：
 * - { id: string, userName: string, loginStatus: number, createTime: string, updateTime: string }
 */
export function queryInventoryBySku(params: InventoryQueryParams): Promise<any> {
  return request({
    url: '/api/inventory/query',
    method: 'get',
    params,
  })
}